<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');

$config['timkhoahoc_db_define'] = true;

define('COURSES', 'courses');
define('COURSES_COURSE_ID', 'course_id');
define('COURSES_PROVIDER_ID', 'course_provider_id');
define('COURSES_FIELD_ID', 'course_field_id');
define('COURSES_FIELD_NAME', 'course_field_name');
define('COURSES_SUBJECT_ID', 'course_subject_id');
define('COURSES_SUBJECT_NAME', 'course_subject_name');
define('COURSES_COURSE_NAME', 'course_name');
define('COURSES_COURSE_DESCRIPTION', 'course_description');
define('COURSES_CREATE_DATE', 'create_date');
define('COURSES_MODIFIED_DATE', 'modified_date');
define('COURSES_START_DATE', 'start_date');
define('COURSES_END_DATE', 'end_date');
define('COURSES_DURATION', 'duration');
define('COURSES_RANGE_DURATION', 'range_duration');
define('COURSES_SCHEDULE', 'schedule');
define('COURSES_MAX_NUM_LEARNER', 'max_num_learner');
define('COURSES_ADDRESS', 'address');
define('COURSES_DISTRICT_ID', 'district_id');
define('COURSES_PROVINCE_ID', 'province_id');
define('COURSES_MAX_DAY_REGISTER_OFFLINE', 'max_day_regrister_offline');
define('COURSES_RANGE_FEE', 'range_fee');
define('COURSES_COURSE_FEE', 'course_fee');
define('COURSES_DISCOUNT_FEE', 'discount_fee');
define('COURSES_ENTRY_REQUIREMENT', 'entry_requirement');
define('COURSES_OTHER_INFO', 'other_info');
define('COURSES_TEACHER', 'teacher');
define('COURSES_PRIORITY', 'priority');
define('COURSES_NUM_VIEW', 'num_view');
define('COURSES_NUM_LIKE', 'num_like');
define('COURSES_CURRENT_STATUS', 'current_status');
define('COURSES_DATE_STATUS_UPDATE', 'date_status_update');
define('COURSES_CURRENT_NUM_REGISTERED', 'current_num_registered');
define('COURSES_PAGE_VIEW', 'page_view');
define('COURSES_FULLTEXT_SEARCH', 'course_keyword');

//Structure TABLE
/*
 `course_id` bigint(20) NOT NULL auto_increment,
  `course_provider_id` int(11) NOT NULL,
  `course_type_id` int(11) NOT NULL,
  `course_type_name` varchar(255) collate utf8_unicode_ci NOT NULL,
  `course_subject_id` int(11) default NULL,
  `course_subject_name` varchar(255) collate utf8_unicode_ci default NULL,
  `course_name` varchar(255) collate utf8_unicode_ci default NULL,
  `course_description` text collate utf8_unicode_ci NOT NULL,
  `create_date` datetime default NULL,
  `modified_date` datetime default NULL,
  `start_date` date default NULL,
  `end_date` date default NULL,
  `duration` varchar(255) collate utf8_unicode_ci default NULL COMMENT 'thoi luong hoc',
  `range_duration` tinyint(1) default '3' COMMENT '1: 1month; 2: 1-3month; 3: 3-6month; 4: 6-9month; 5: 9-12month; 6: above 12month',
  `schedule` varchar(255) collate utf8_unicode_ci default NULL COMMENT 'lich hoc',
  `max_num_learner` int(11) default NULL,
  `address` varchar(255) collate utf8_unicode_ci default NULL,
  `max_day_regrister_offline` tinyint(4) default NULL COMMENT 'gioi han ngay dang ky offline',
  `range_fee` tinyint(1) default NULL COMMENT '1: under 1; 2: 1-2mil; 3: 2-3mil; 4: 3-5mil; 5: 5-7mil; 6: 7-9mil, 7: 9-11mil; 8: above 11mil',
  `course_fee` varchar(255) collate utf8_unicode_ci default NULL,
  `discount_fee` int(10) default NULL,
  `entry_requirement` varchar(255) collate utf8_unicode_ci default NULL,
  `other_info` text collate utf8_unicode_ci,
  `num_view` int(11) default NULL,
  `num_like` int(11) default NULL,
  `current_status` tinyint(2) default '1' COMMENT '0: notactived; 1: actived; 2: close; 3: stop; 4: reopen; 5: deleted ',
  `date_status_update` datetime default NULL,
  `current_num_registered` int(11) default NULL,
  `page_view` int(11) default NULL,
 */

//FullTest Search
/*ALTER TABLE courses ADD FULLTEXT(course_type_name,course_subject_name, course_name, course_description);*/
?>
